home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / html / src / hog.src < prev    next >
Text File  |  1998-07-27  |  2KB  |  35 lines

  1. @@@STARTPACK(hog;Hog - memory, cpu and i/o hog analyser)
  2.  
  3. <P>
  4. The hog commands analyse resource use by  processes.   The
  5. hog  commands  all work in the same basic way, but observe
  6. the consumption of different resources.   memhog  examines
  7. memory use, cpuhog examines processor use, and iohog
  8. examines I/O use.  In the following discussion, hog means  one
  9. of  the  possible invocations (e.g., memhog), and resource
  10. refers to the resource in which that hog is interested.
  11. <P>
  12. hog runs in a loop.  Each time it loops, the resource
  13. consumption for each process is obtained from the kernel, and
  14. a ``hog'' value computed,  based  on  a  resource-specific
  15. algorithm.  The algorithm is intended to measure the overall
  16. impact of  a  process  on  the  resource.   After  the
  17. ``hog''  values  are computed, the processes are displayed
  18. in descending ``hog'' order.  Thus, the process at the top
  19. if of the display is using the most resource.  Note that a
  20. process with a ``hog'' value of  zero  will  not  be 
  21. displayed.  hog is terminated by sending it SIGINT.
  22. <P>
  23. Each  process  is  represented  in the display by a single
  24. line, with the pid and uid associated with the process  on
  25. the left, and the command being executed on the right.  In
  26. the middle are resource-specific numbers.  The top line of
  27. the  display  contains a legend, and possibly some overall
  28. system statistics relating to resource.
  29. </P>
  30.  
  31. @@@OSR5DIST(http://www.sco.com/skunkware/osr5/sysadmin/hog/)
  32. @@@SOURCE(http://www.sco.com/skunkware/src/sysadmin/)
  33. @@@ENDPACK
  34.  
  35.